package com.wings4.accounting

class VoucherDetails {

   Integer voucherYear;
   Integer voucherId;
   MasterVoucher masterVoucher;
    AccountHead accountHead;
    Byte voucherType;  //0,1 Debit or credit
   Date voucherDate;
   Date entryDate;
    Double debitAmount;
    Double creditAmount;
   String reference;
   String narration;
   Byte status;
   String postedBy;
   Date postedDate;


    static constraints = {
        voucherId(nullable: true);
        masterVoucher(nullable: true);
        voucherType(nullable: true);
        voucherDate(nullable: true);
        entryDate(nullable: true);
        debitAmount(nullable: true);
        creditAmount(nullable: true);
        reference(nullable: true);
        narration(nullable: true);
        status(nullable: true);
        postedBy(nullable: true);
        postedDate(nullable: true);
    }

    static mapping = {
        voucherDate(sqlType: 'date');
        entryDate(sqlType: 'date');
        postedDate(sqlType: 'date');
    }
}
